CyclomaticComplexityRule and General Updates#94
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This pull request adds a new CyclomaticComplexityRule to detect methods with high cyclomatic complexity, updates composer dependencies, fixes README information, and refactors test files to follow PSR-4 standards by splitting multi-class fixture files into separate files with corrected namespaces.
- Adds comprehensive CyclomaticComplexityRule implementation with configurable thresholds and reporting options
- Updates all composer dependencies to latest versions
- Refactors test fixtures across multiple rules to follow PSR-4 (one class per file)
- Corrects test namespaces and updates test expectations after fixture reorganization
Reviewed changes
Copilot reviewed 74 out of 75 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/Rules/CyclomaticComplexity/CyclomaticComplexityRule.php | New rule implementation calculating cyclomatic complexity for methods and classes |
| src/Rules/CyclomaticComplexity/Config.php | Configuration class for complexity thresholds and reporting options |
| config/extension.neon | Adds parameter schema and service registration for CyclomaticComplexity rule |
| docs/CyclomaticComplexity.md | Comprehensive documentation for the new rule with examples |
| tests/Rules/CyclomaticComplexity/* | Test suite with 4 test scenarios covering different configurations |
| tests/Rules/TooManyMethods/Fixture/* | Splits monolithic ExampleClass.php into separate PSR-4 compliant files |
| tests/Rules/ShortClassName/Fixture/* | Splits combined fixture files into individual class files |
| tests/Rules/LongClassName/Fixture/* | Splits interface/trait/enum into separate files |
| tests/Rules/ConstructorWithNameAsEnclosingClass/Fixture/* | Separates classes, traits, and interfaces into individual files |
| tests/Rules/ConstantNamingConventions/Fixture/* | Splits interface and enum into separate files |
| tests/Rules/BooleanArgumentFlag/Fixture/* | Reorganizes fixtures into separate files per class |
| tests/Rules/BooleanArgumentFlag/config/* | Updates ignored class namespaces to match corrected test namespaces |
| CLAUDE.md | Adds PSR-4 fixture file standards documentation |
| README.md | Adds CyclomaticComplexity to rules table, comments out contributing section |
| composer.json | Removes PHP_CS_FIXER_IGNORE_ENV export from cs-fix script |
| composer.lock | Updates all dependency versions to latest compatible releases |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Update composer deps, fix some README information, add CyclomaticComplexityRule closing #37, and fix a lot of test file namespaces